package com.wo.android.pockybill;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

import com.wo.android.pockybill.ui.NotifyComponet;
import com.wo.android.pockybill.ui.NotifyComponetImpl;

/**
 * 開機監聽器
 * 
 * @author Andy
 * 
 */
public class BillBootReceiver extends BroadcastReceiver {

	private NotifyComponet notifyComponet;

	@Override
	public void onReceive(Context context, Intent intent) {

		// 開機啟動
		if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {

			Toast.makeText(context, "帳單系統提醒已啟動", Toast.LENGTH_SHORT).show();
			this.notifyComponet = new NotifyComponetImpl(context);
			this.notifyComponet.eachDayNotiy();

		}

	}

}
